package com.ggshily.swf.tag;

import java.io.DataInput;

public class SWFTag implements ISWFTag
{
	/**
	 * @return the offset
	 */
	public int getOffset()
	{
		return offset;
	}
	/**
	 * @param offset the offset to set
	 */
	public void setOffset(int offset)
	{
		this.offset = offset;
	}
	/**
	 * @return the endOffset
	 */
	public int getEndOffset()
	{
		return endOffset;
	}
	/**
	 * @param endOffset the endOffset to set
	 */
	public void setEndOffset(int endOffset)
	{
		this.endOffset = endOffset;
	}
	/**
	 * @return the tag
	 */
	public int getTag()
	{
		return tag;
	}
	/**
	 * @param tag the tag to set
	 */
	public void setTag(int tag)
	{
		this.tag = tag;
	}
	
	public byte[] getData()
	{
		return data;
	}
	public void parseData(DataInput di) throws Exception
	{
		data = new byte[endOffset - offset];
		di.readFully(data);
	}

	public int offset;
	public int endOffset;
	public int tag;
	public byte[] data;
}
